package com.neusoft.nepa.entity;

import java.io.Serializable;

// 可序列化的数据传输对象
public class AdminDataDTO implements Serializable {
    private int indexColumn;
    private String feedbackName;
    private String withinProvince;
    private String withinCity;
    private String feedbackDate;
    private String feedbackTime;
    private String previewIndex;
    private String hyperlink;
    private String info;

    // 构造函数
    public AdminDataDTO(AdminData adminData) {
        this.indexColumn = adminData.getIndexColumn();
        this.feedbackName = adminData.getFeedbackName();
        this.withinProvince = adminData.getWithinProvince();
        this.withinCity = adminData.getWithinCity();
        this.feedbackDate = adminData.getFeedbackDate();
        this.feedbackTime = adminData.getFeedbackTime();
        this.previewIndex = adminData.getPreviewIndex();
        this.hyperlink = adminData.getHyperlink();
        this.info = adminData.getInfo();
    }

    // 转换回 AdminData
    public AdminData toAdminData() {
        AdminData adminData = new AdminData(
                feedbackName, withinProvince, withinCity,
                previewIndex, feedbackDate, feedbackTime, info
        );
        adminData.setIndexColumn(indexColumn);
        adminData.setHyperlink(hyperlink);
        return adminData;
    }

    public String getFeedbackName() {
        return feedbackName;
    }

    public String getWithinProvince() {
        return withinProvince;
    }

    public String getWithinCity() {
        return withinCity;
    }

    public String getFeedbackDate() {
        return feedbackDate;
    }

    public String getFeedbackTime() {
        return feedbackTime;
    }

    public String getPreviewIndex() {
        return previewIndex;
    }

    public String getHyperlink() {
        return hyperlink;
    }

    public String getInfo() {
        return info;
    }

}